package demo;

public class Classroom {

    //共有成员变量
    String name;//名字
    int age;//年龄
    int id;//学号


    //静态代码块
    static {
        System.out.println("父类静态代码块被调用");
    }

    //实例代码块
    {
        System.out.println("父类实例代码块被调用");
    }

    public Classroom(String name, int age, int id) {
        this.name = name;
        this.age = age;
        this.id = id;
        System.out.println("父类构造方法被调用");
    }

}
